package com.sx.pipeline.utils;

import android.view.View;

import com.jakewharton.rxbinding4.view.RxView;

import java.util.concurrent.TimeUnit;

import io.reactivex.rxjava3.functions.Consumer;

public class RxViewUntil {
    public static void setClickShake(View mView, View.OnClickListener listener){
        RxView.clicks(mView).throttleFirst(500, TimeUnit.MILLISECONDS)
                .subscribe((Consumer<Object>) o -> listener.onClick(mView));
    }
}
